from fdfs_client.client import Fdfs_client

# 创建fastdfs客户端，指定配置文件
fdfs_cliennt = Fdfs_client('./client.conf')

ret = fdfs_cliennt.upload_by_filename('/home/python/Desktop/preview.jpg')
print(ret)
"""
{'Group name': 'group1',
 'Remote file_id':'group1/M00/00/00/wKjTgl0sSfmAFdKaAAM0m482mfo831.jpg',
 'Status': 'Upload successed.', 
 'Local file name': '/home/python/Desktop/preview.jpg',
 'Uploaded size': '205.00KB',
 'Storage IP': '192.168.211.130'}

"""